package au.com.handsunited.web.controller.entity;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

import au.com.handsunited.model.BaseEntity;

/**
 *
 * @author arunda
 */
public abstract class AbstractPaginatedEntitySimpleFormController extends
		SimpleFormController {


	private List<BaseEntity> entitiesList;
	private int pageNumber;
	private int pageLength;
	private int fullListSize;


	private static Logger logger = LoggerFactory.getLogger(AbstractPaginatedEntitySimpleFormController.class);


	/**
	 *
	 */
	public AbstractPaginatedEntitySimpleFormController() {

	}






	/**
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#processFormSubmission(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.validation.BindException)
	 */
	@Override
	protected ModelAndView processFormSubmission(HttpServletRequest request,
			HttpServletResponse response, Object command, BindException errors)
			throws Exception {

		return super.processFormSubmission(request, response, command, errors);
	}


	/**
	 * @see org.springframework.web.servlet.mvc.AbstractFormController#isFormSubmission(javax.servlet.http.HttpServletRequest)
	 */
	@Override
	protected boolean isFormSubmission(HttpServletRequest request) {

		return super.isFormSubmission(request);
	}


	/**
	 * @return the pageNumber
	 */
	public int getPageNumber() {
		return pageNumber;
	}


	/**
	 * @param pageNumber the pageNumber to set
	 */
	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}


	/**
	 * @return the pageLength
	 */
	public int getPageLength() {
		return pageLength;
	}


	/**
	 * @param pageLength the pageLength to set
	 */
	public void setPageLength(int pageLength) {
		this.pageLength = pageLength;
	}


	/**
	 * @return the fullListSize
	 */
	public int getFullListSize() {
		return fullListSize;
	}


	/**
	 * @param fullListSize the fullListSize to set
	 */
	public void setFullListSize(int fullListSize) {
		this.fullListSize = fullListSize;
	}




}
